package cn.tank.data.sync.server.redis;

import cn.tank.data.sync.core.common.Subscriber;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/************************************************
 * @Description:消息监听测试
 * @Version: 1.0
 ************************************************/
public class MessageListenTest extends Subscriber {

    private static final Logger log = LoggerFactory.getLogger(MessageListenTest.class);

    private static final String SUBSCRIBER_NAME = "test subscriber";

    public MessageListenTest() {
        super(SUBSCRIBER_NAME);
    }


    @Override
    public void write(String channel, Object entiry) {
        log.info("监听者{}，监听到频道{}，写事件的数据{}。", getName(), channel, entiry);
        //其他业务逻辑处理
    }

    @Override
    public void update(String channel, Object entiry) {
        log.info("监听者{}，监听到频道{}，更新事件的数据{}。", getName(), channel, entiry);
        //其他业务逻辑处理
    }

    @Override
    public void delete(String channel, Object entiry) {
        log.info("监听者{}，监听到频道{}，删除事件的数据{}。", getName(), channel, entiry);
        //其他业务逻辑处理
    }

    @Override
    public void refresh(String channel) {
        log.info("监听者{}，监听到频道{}，刷新事件。", getName(), channel);
        //其他业务逻辑处理
    }
}
